<?php
namespace app\miniprogram\controller;

/**
 * 产品状态options
 */
class Statistics extends Base
{
	protected $process = 'Statistics';
	protected $noNeedLogin = ['index'];

    public function index() {
        $this->ajax_process(function($process, $user) {
        	$result = [];
        	$result['today_order_number'] = $process->today_order_number($user);
        	$result['today_money'] = $process->today_money($user);
        	$result['today_product_nums'] = $process->today_product_nums($user);
        	return $result;
        });
    }

    public function user_index() {
         $this->ajax_process(function($process, $user) {
            $result = [];
            $result['today_order_number'] = $process->today_store_order_number();
            $result['today_money'] = $process->today_store_money();
            $result['today_product_nums'] = $process->today_store_product_nums();
            return $result;
        });
    }
}
